$(document).ready(function() {
	
	var strLabelPerimetre = $("#labelPerimetre").val();
	var labelPerimetreSplitted = strLabelPerimetre.split("###");
	
	var strChargeInitTotalToCharts = $("#chargeInitTotalToCharts").val();
	var dataSetsChargeInit = strChargeInitTotalToCharts.split("###");
	
	var strConsoTotalToCharts = $("#consoTotalToCharts").val();
	var dataSetsConsoTotal = strConsoTotalToCharts.split("###");
	
	var strRafTotalToCharts = $("#rafTotalToCharts").val();
	var dataSetsRafTotal = strRafTotalToCharts.split("###");
	
	var barChartData = {
		labels : labelPerimetreSplitted,
		datasets : [ {
			fillColor : "rgba(220,220,220,0.5)",
			strokeColor : "rgba(220,220,220,1)",
			data : dataSetsChargeInit
		}, {
			fillColor : "rgba(151,187,205,0.5)",
			strokeColor : "rgba(151,187,205,1)",
			data : dataSetsConsoTotal
		}, {
			fillColor : "rgba(204,51,51,0.5)",
			strokeColor : "rgba(204,51,51,1)",
			data : dataSetsRafTotal
		}]

	};
	
	new Chart(document.getElementById("bar").getContext("2d")).Bar(barChartData);

});